{% extends 'base.html' %}
{% block content %}
    <form method="post" class="form-horizontal" action="">
    <fieldset>
        <legend>{{ user.name }}</legend>
        {% if info %}
            <p class="alert alert-success">
                {{ info }}
            </p>
        {% endif %}
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="username" id="username" value="{{ user.username }}" disabled>
            </div>
            <input type="hidden" class="form-control" name="username" id="username" value="{{ user.username }}">
        </div>

        <div class="form-group">
            <label for="asset" class="col-sm-2 control-label">服务器</label>
            <div class="col-sm-10">
                <select multiple class="form-control add-perm" name="asset">
                {% for asset in assets %}
                    <option value="{{ asset.id }}">{{ asset.ip }}</option>
                {% endfor %}
                </select>
            </div>
         </div>

        <div class="from-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">添加</button>
            </div>
        </div>



    </fieldset>
    </form>
{% endblock %}